package com.peng.egmybatis1.mapper;

import com.peng.egmybatis1.pojo.entity.Order;
import com.peng.egmybatis1.pojo.vo.OrderListVO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * @Author peng
 * @Date 2024-04-19 20:28
 */
@Mapper
public interface OrderMapper {
    @Insert("insert into orders(order_id, cust_id, order_date, status, products_num, amt) " +
            "values(#{orderId}, #{customerId}, #{orderDate}, #{status}, #{productsNum}, #{amount})")
    int insertOrder(Order order);

    OrderListVO selectOrdersByCustomerId(OrderListVO orderListVO);
}
